package com.zn.service;

import com.zn.entity.CustomerWithdraw;
import com.zn.entity.PayChannel;
import com.zn.vo.Message;
import com.zn.vo.PayMethodVo;
import com.zn.vo.Response;
import com.zn.web.dto.CustomerWithdrawDto;
import com.zn.web.dto.OnLineRechargeDto;
import com.zn.web.dto.PayChannelDto;
import com.zn.web.dto.UnderLineRechargeDto;
import com.zn.web.vo.CustomerCapitalVo;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * Created by yinjiawei on 2018/8/1.
 */
public interface PayChannelService {
    /**
     * 调接口获取支付方式 1网关 2快捷
     * @param payType
     * @return
     */
    List<PayMethodVo> selectPayChannel(String payType);
    /**
     * 线下充值
     * @param filePath 凭证url
     * @param underLineRecharge form表单值
     */
    ResponseEntity<Message> underLineRecharge(String filePath,UnderLineRechargeDto underLineRecharge);

    /**
     * 点击进入提现
     * @return
     */
    ResponseEntity<Message> clickWithdraw(PayChannelDto payChannelDto) throws Exception;
    /**
     * 线上充值
     * @param onLineRechargeDto
     * @return
     */
    ResponseEntity<Message> onLineRecharge(OnLineRechargeDto onLineRechargeDto);

    /**
     * 客户提现
     * @param customerWithdrawDto
     * @return
     */
    ResponseEntity<Message> customerWithdraw(CustomerWithdrawDto customerWithdrawDto);

    /**
     * 线上充值回调
     * @param response
     */
    void onLineRechargeCallback(Response response) throws Exception;

    void submitSuccessCallback(Response response) throws Exception;

    /**
     * 根据客户ID查询该客户是否存在代付未扣总资金的情况
     * @param customerId
     * @throws Exception
     */
    void dfQueryByCustomer(String customerId) throws Exception;

    /**
     * 根据用户分页获取资金记录（入金和出金记录）
     * @param customerWithdrawDto
     * @return
     */
    List<CustomerCapitalVo> getCustomerCapitalRecord(CustomerWithdrawDto customerWithdrawDto);

    /**
     * 给h5使用 总记录数
     * @param customerWithdrawDto
     * @return
     */
    int getCustomerCapitalRecordCount(CustomerWithdrawDto customerWithdrawDto);

    /**
     * 校验是否存在未审核提现
     * @param customerId
     * @return
     */
    List<CustomerWithdraw> checkIsExistWithdraw(String customerId);
}
